package java67_18;

import java.util.Scanner;

public class CalcTest {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		Caculator c = new Caculator("卡西欧");
		System.out.println("请输入两个数:");
		int a = in.nextInt();
		int b = in.nextInt();
		// 捕捉到异常,自己处理
		try {
			int shang = c.div(a, b);
			System.out.println("除法结果是:" + shang);
		} catch (Exception e) {
			System.out.println("main捕捉了错误");
			e.printStackTrace();
		}

//		try {
//			int shang = c.divide(a, b);
//			System.out.println("除法结果是:" + shang);
//		} catch (Exception e) {
//			System.out.println("输入的不对");
//			e.printStackTrace();
//		}
	}

}
